package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzEquipmentAircraftMapper;
import com.ruoyi.business.domain.CzEquipmentAircraft;
import com.ruoyi.business.service.ICzEquipmentAircraftService;

/**
 * 航空器登记Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-26
 */
@Service
public class CzEquipmentAircraftServiceImpl implements ICzEquipmentAircraftService 
{
    @Autowired
    private CzEquipmentAircraftMapper czEquipmentAircraftMapper;

    /**
     * 查询航空器登记
     * 
     * @param id 航空器登记主键
     * @return 航空器登记
     */
    @Override
    public CzEquipmentAircraft selectCzEquipmentAircraftById(String id)
    {
        return czEquipmentAircraftMapper.selectCzEquipmentAircraftById(id);
    }

    /**
     * 查询航空器登记列表
     * 
     * @param czEquipmentAircraft 航空器登记
     * @return 航空器登记
     */
    @Override
    public List<CzEquipmentAircraft> selectCzEquipmentAircraftList(CzEquipmentAircraft czEquipmentAircraft)
    {
        return czEquipmentAircraftMapper.selectCzEquipmentAircraftList(czEquipmentAircraft);
    }

    /**
     * 新增航空器登记
     * 
     * @param czEquipmentAircraft 航空器登记
     * @return 结果
     */
    @Override
    public int insertCzEquipmentAircraft(CzEquipmentAircraft czEquipmentAircraft)
    {
        czEquipmentAircraft.setCreateTime(DateUtils.getNowDate());
        return czEquipmentAircraftMapper.insertCzEquipmentAircraft(czEquipmentAircraft);
    }

    /**
     * 修改航空器登记
     * 
     * @param czEquipmentAircraft 航空器登记
     * @return 结果
     */
    @Override
    public int updateCzEquipmentAircraft(CzEquipmentAircraft czEquipmentAircraft)
    {
        czEquipmentAircraft.setUpdateTime(DateUtils.getNowDate());
        return czEquipmentAircraftMapper.updateCzEquipmentAircraft(czEquipmentAircraft);
    }

    /**
     * 批量删除航空器登记
     * 
     * @param ids 需要删除的航空器登记主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentAircraftByIds(String[] ids)
    {
        return czEquipmentAircraftMapper.deleteCzEquipmentAircraftByIds(ids);
    }

    /**
     * 删除航空器登记信息
     * 
     * @param id 航空器登记主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentAircraftById(String id)
    {
        return czEquipmentAircraftMapper.deleteCzEquipmentAircraftById(id);
    }
}
